package ink.tiptop.exception;

/**
 * @author zjf
 * @date 2020-08-16 21:00
 */
public class HandWritten {
    private static final String[] GEAR = {"ONE", "TWO", "THREE", "OVERDRIVE", "REVERSE"};

    /**
     * 方法名称不重要,重要的是 入参类型和返回值类型 必须唯一 ***
     *
     * @param stringVal
     * @return
     * @throws GearException
     * @throws FatalException
     */
    public String toHeights(String stringVal) throws GearException, FatalException {
        if (stringVal == null) {
            throw new FatalException("null is not a valid gear");
        }

        if (stringVal.isEmpty()) {
            throw new GearException("invalid gear");
        }
        return stringVal;
    }

}
